home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Read-Me1.3 / Workbench1.3 / FFS < prev    next >
Encoding:
Text File  |  1988-02-11  |  8.0 KB  |  183 lines

  1.  
  2.                          1.3 FAST FILING SYSTEM
  3.                          ======================
  4.                              by Steve Beats
  5.  
  6. The Fast Filing System is a new file system provided for use with any hard
  7. disk that you can connect to your Amiga.  The only restriction is that the
  8. hard disk driver must provide the standard set of disk device commands and
  9. present the media in track and sector format. Since Commodore's controller
  10. (the A2090) auto-mounts the default filesystem on the first partition of a
  11. hard disk, it is not possible to use the Fast Filing System here. However,
  12. using a new version of the Mount command, it's possible to make additional
  13. partitions that utilize the Fast Filing System instead.
  14.  
  15. Fast Filing System (called FFS from now on) was based on the original file
  16. system provided by AmigaDOS. This resulted in a high level of compatibility
  17. that allowed application programs and the standard DOS commands to function
  18. under FFS without any changes required. That is where the similarities end!
  19. FFS was completely re-written in assembler and many of the algorithms were
  20. completely revised to provide much faster response for internal processing.
  21. FFS now spends MUCH more time waiting for I/O or DOS packets instead of
  22. spending all it's time figuring out what to do.  For a task that runs at a
  23. high priority on a multi-tasking machine this has obvious benefits.
  24.  
  25. Although there have been many minor re-arrangements of the disk format, the
  26. only major incompatibilty with the old filesystem concerns the data blocks.
  27. Under the old system, data blocks consisted of 24 bytes of header information
  28. followed by 488 bytes of user data.  This means the old system has no option
  29. but to read data from the drive one block at a time.  Since most hard drives
  30. use DMA to transfer data from the disk to memory, this is really inefficient
  31. and does not use the hardware to its full potential.  FFS addresses this
  32. problem by storing nothing but data in the data blocks.  Wherever possible,
  33. data blocks are allocated consecutively which means large reads and writes
  34. can be performed in one operation.  Even though the old filesystem uses this
  35. allocation technique, most gains are lost because it must make separate I/O
  36. requests for each block.  In addition to this, the old filesystem uses cache
  37. buffers for both data and header blocks, while FFS only caches headers and
  38. partial data block transfers.  Large reads and writes that are multiples of
  39. 512 and positioned at an even address are transferred directly to or from
  40. the user buffer.  This is possible because there is no extraneous information
  41. to be stripped from the data.  It is worth noting that a pleasant side
  42. effect of the new data format is a 4.9% increase in the amount of data that
  43. can be stored on a given disk.  This amounts to about 50K per Megabyte extra.
  44.  
  45. The speed increases are a little difficult to quantify because FFS can read
  46. unfragged files as fast as the disk can transfer the data and write files at
  47. about 75% of the maximum disk transfer rate.  This compares very favourably
  48. with the old file system which loses percentage transfer speed as the speed
  49. of the disk increases.  Using a Conner 100Mb SCSI drive and the Commodore
  50. A2090 controller FFS was 12 times faster then the old filing system on both
  51. read and write operations utilizing a 100KB buffer.  ExNext (the DOS function
  52. to scan a directory) is anything from 5 to 20 times faster, depending on how
  53. many cache buffers have been allocated and how many of the file headers are
  54. in those cache buffers.  The disk validator is now resident with FFS and does
  55. not need to be loaded off the disk as in the old filesystem.  Validation of
  56. a regular sized harddisk (about 20 Meg) will complete about 40 times faster
  57. and allow accesses to that disk with a performance hit of only 40% (as
  58. opposed to around 90% under the old filesystem).
  59.  
  60. To summarize;  FFS is much faster than the old filesystem in all areas. As
  61. the disk transfer speed increases, FFS keeps up and fully utilizes the data
  62. bandwidth of a given controller.  Compatibility with most existing software
  63. has been maintained with the exception of DiskDoctor type programs that have
  64. knowledge of the old data block format.  
  65.  
  66.  
  67.  
  68.                               MOUNTING FFS
  69.                               ============
  70.  
  71. The 2090 driver software automounts the first hard disk partition as a
  72. normal filesystem device.  The fast file system (FFS) may be used on any
  73. additional partitions since these are mounted via the MOUNT command and
  74. a different filesystem may be specified in the mountlist entries for
  75. these partitions.  However, these partitions must be (re)formatted
  76. in FFS format for use with FFS.
  77.  
  78.  
  79. 1. First, back up or save off the contents of your hard drive.
  80.  
  81. 2. Copy the new l:FastFileSystem, c:Mount, and c:Format to your boot disk
  82.  
  83.  
  84. 3a. IF YOUR HARD DRIVE IS ALREADY SUITABLY PARTITIONED
  85.  
  86. You will probably want your initial automounted normal filesystem
  87. partition to be relatively small.  If your drive is currently partitioned
  88. and the first partition size is acceptable to you as your normal
  89. filesystem partition, you will probably be able to avoid re-prepping
  90. and re-formatting your entire drive.  If this is the case, just
  91. edit the devs/mountlist entries for your additional Amiga partition(s)
  92. to add these lines to each partition's entry:
  93.  
  94.    GlobVec     = 1
  95.    FileSystem  = L:FastFileSystem
  96.  
  97. (NOTES - Do not change the LowCyl or HiCyl for any partition!  If you
  98.  change them, you must re-prep and reformat the whole drive - see 3b.
  99.  If you change the names of your partitions, remember to also change 
  100.  the names being mounted in your startup-sequence to match.)
  101.  
  102. Then reboot.  When your startup script mounts these partitions you
  103. will get Not A DOS Disk requesters.  Cancel them.  Then Format the
  104. FFS partitions with the new Format command:
  105.  
  106.    Example (for a partition named fs1):
  107.  
  108.       Format drive fs1: name "FAST1" FFS
  109.  
  110.  
  111. 3b. IF YOUR DRIVE IS NOT CURRENTLY SUITABLY PARTITIONED
  112.  
  113. If your hard drive is not currently partitioned, you will have to
  114. re-prep your drive and reformat all partitions.  Edit your mountlist
  115. and set up entries for one or more FFS partitions.  Your lowcyl and
  116. highcyl will be dependent on how many cylinders you plan to specify
  117. for the initial automount normal filesystem partition during Prep.
  118.  
  119. Some people prefer a small initial partition (cylinders 2 through 3);
  120. others like a first partition of at least 880K to hold Workbench.
  121. The following equations will help you determine how many cylinders
  122. will hold Workbench:
  123.  
  124. BytesPerCyl = BlocksPerTrack * Surfaces * 512
  125. BytesPerFloppy = 880 * 1024 = 901120
  126. CylsToHoldFloppy = BytesPerFloppy / BytesPerCyl (round up the result)
  127.  
  128. For our example 20 meg ST506 drive, this works out to 26 cylinders.
  129.  
  130. Use prep as described in your 2090 manual and set up your partitions.
  131. Our example drive would be prepped for cylinders 0-1 reserved (RES0:),
  132. cylinders 2-28 as first partition (automounted normal filesystem DH0:),
  133. and the remaining cylinders 29-611 for your fast file system partition.
  134.  
  135. Reboot the machine once prep is complete and then proceed through
  136. through the following steps which assume that you are using an ST506
  137. 20 Megabyte drive with the first partition occupying cyclinders 2 to 28.
  138. Note: if you are using a different kind of drive you will have to adjust
  139. the drive parameters.
  140.  
  141.  
  142.    1. Edit your devs/mountlist and add an entry to describe your
  143.       FFS partition.  The GlobVec and FileSystem lines are required
  144.       for any FFS entry.
  145.  
  146.       Sample mountlist entry:
  147.  
  148.  
  149. FS1:   Device  = hddisk.device
  150.    Unit        = 1
  151.    Flags       = 0
  152.    Surfaces    = 4
  153.    BlocksPerTrack = 17
  154.    Reserved    = 2
  155.    Interleave  = 0
  156.    LowCyl      = 29
  157.    HighCyl     = 611
  158.    Buffers     = 20
  159.    Stacksize   = 1000
  160.    GlobVec     = 1
  161.    FileSystem  = L:FastFileSystem
  162. #
  163.  
  164.  
  165.    2. Format your first partition (dh0:) for the normal file system:
  166.  
  167.          FORMAT DRIVE DH0: NAME AmigaHD
  168.  
  169.    3. Mount your FFS partition:
  170.  
  171.          MOUNT FS1:
  172.  
  173.    4. Format your FFS partition for the fast file system:
  174.  
  175.          FORMAT DRIVE FS1: NAME "FAST1" FFS
  176.  
  177.    5. Edit your startup-sequence and add a line to  MOUNT FS1:
  178.       sometime after BINDDRIVERS. 
  179.  
  180.  
  181.  
  182.  
  183.